﻿#pragma execution_character_set("utf-8")
#include "ForenoonState.h"
#include <QDebug>
#include "NoonState.h"

ForenoonState::ForenoonState()
{

}

void ForenoonState::WriteProgram(shared_ptr<Work> work)
{
    if (work->getHour() < 12) {
        qDebug() << QString("当前时间：%1点 上午工作，精神百倍").arg(work->getHour());
    }
    else {
        work->setCurrent(shared_ptr<NoonState>(new NoonState()));
        work->WriteProgram();
    }
}
